package com.example.presentshopping.config.base

import android.app.Activity

class ActivityCollector {
    private val activies = ArrayList<Activity>()

    fun addActivity(activity: Activity){
        activies.add(activity)
    }
    fun removeActivty(activity: Activity){
        activies.remove(activity)
    }


    fun finishAll(){
        for(activity in activies){
            if(!activity.isFinishing){
              activity.finish()
            }
        }
        activies.clear()
    }


}